package day02.Order;

/**
 * @author yangwenqi
 * @decs TODO
 * @date 2025/4/17
 */
public class Goods {
    private String name;        // 名称
    private double price;       // 价格
    private int quantity;       // 数量
    private String description; // 描述

    // 构造方法
    public Goods(String name, double price, int quantity, String description) {
        this.name = name;
        this.price = price;
        this.quantity = quantity;
        this.description = description;
    }

    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;
    }

    public double getPrice() {
        return price;
    }
    public void setPrice(double price) {
        this.price = price;
    }

    public int getQuantity() {
        return quantity;
    }
    public void setQuantity(int quantity) {
        this.quantity = quantity;
    }

    public String getDescription() {
        return description;
    }
    public void setDescription(String description) {
        this.description = description;
    }
    // 显示商品信息
    public void displayInfo() {
        System.out.println("商品详情");
        System.out.println("名称：" + name);
        System.out.println("价格：" + price);
        System.out.println("数量：" + quantity );
        System.out.println("描述：" + description);
    }
}

